<?php
/*
Overmundo, cultura de todo o Brasil
Desenvolvido pela Tecnopop para o Núcleo de Idéias Movimento
Copyright (C) 2006  Núcleo de Idéias Movimento

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/

header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-type: text/css; charset=iso-8859-1"); 

require('../lib/class.site.php');
require('../lib/class.overmundo.php');
require('../lib/class.conecta.php');

if ($_GET["tag"]) {
	$tag = $_GET["tag"];
}

//echo "GET " . $_GET["tag"];

$minhaConexao = new Conecta();

$meuSite = new Overmundo();

$meuSite->linkid = $minhaConexao->linkid;

/*
echo "GET " . $_GET["selec"];

if (!($valorSelecionado = $_GET["selec"])) {
	$valorSelecionado = "--NOP--";
}
*/

$resTag = $meuSite->OvermundoListaTags(" codTag = '".$tag."'", "");
if ($row = mysql_fetch_array($resTag)) {
	$titulo = $row["tituloUnicoTag"];
}

$labelBotao = "transferir";

?>




<table border="0" cellspacing="0" cellpadding="0" class="txt13">
	<tr>
		<td valign="bottom"><img src="../images/seta_azul_painel.gif" width="10" height="9" />&nbsp;&nbsp;&nbsp;</td>
		<td><strong>Seleciona Tag Final</strong><br />
    <span class="padding10bottom">
      <select name="slcTagDestino"  id="slcTagDestino" style="width:177px;">
        <option value="0" selected>Selecione...</option>

<?
if ($tag) {
	$resTagsDestino = $meuSite->OvermundoListaTags("codTag != '$tag'", " tituloUnicoTag ");
	
	while ($row = mysql_fetch_array($resTagsDestino)) {
		$value = $row["tituloUnicoTag"]." (".$row["hitsTag"].") ";
		$meuSite->insertOption($row["codTag"], $value, 1, $tagDestinoSelecionado);
	}
}
?>
      </select>
    </span><input type="hidden" name="etapaEnvio" value="1"/>
    
    </td>
	</tr>
	<tr>
		<td valign="bottom">&nbsp;</td>
		<td><img src="../images/spacer.gif" width="1" height="22" /><input name="submit" type="submit" class="button" value= "<?=$labelBotao?>"  onClick="mostraCarregamento()"></td>
	</tr>
	<tr>
		<td valign="bottom">&nbsp;</td>
		<td><img src="../images/spacer.gif" width="1" height="22" /><input name="cmdApagar" type="submit" class="button" value="apagar tag <?=$titulo?>" /></td>
	</tr>
	<tr>
		<td valign="bottom">&nbsp;</td>
		<td><img src="../images/spacer.gif" width="1" height="22" /><input name="button" type="button" class="button" onclick="javascript:window.open('../home/busca_tag.php?tag=<?=$titulo?>', '_blank'); void(0);" value="buscar por tag <?=$titulo?>" /></td>
	</tr>
</table>







